package com.bitdf.txing.group.feign.impl.ware;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bitdf.txing.common.utils.R;
import com.bitdf.txing.order.dao.OrderDao;
import com.bitdf.txing.order.entity.OrderEntity;
import com.bitdf.txing.ware.feign.WareOrderFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;

/**
 * @author Lizhiwei
 * @date 2023/9/6 19:47:26
 * 注释：
 */
@Service
@ConditionalOnProperty(value = "tx.deploy.mode", havingValue = "standalone")
public class WareOrderFeignServiceImpl implements WareOrderFeignService {
//    @Autowired
//    OrderService orderService;
    @Autowired
    OrderDao orderDao;
    @Override
    public R getOrderStatus(String orderSn) {
        OrderEntity orderEntity = orderDao.selectOne(new QueryWrapper<OrderEntity>().eq("order_sn", orderSn));
        return R.ok().setData(orderEntity);
    }
}
